package com.board.form;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@ApiModel(value = "新增资源参数对象")
public class ResourceAddForm {
    @ApiModelProperty("资源名字")
    @NotNull(message = "资源名字不能为空")
    private String name;
    @ApiModelProperty("资源路径")
    private String resourceUrl;
    @ApiModelProperty("父资源id")
    @NotNull(message = "父资源id不能为空")
    @Min(value = 0,message = "父资源id不能小于0")
    private Integer parentId;
    @ApiModelProperty("资源级别")
    @NotNull(message = "资源级别不能为空")
    @Size(min = 1,max = 3,message = "资源级别不能小于1或大于3")
    private Integer level;
}
